package com.liao.badminton.mapper;

import com.liao.badminton.code.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liao.badminton.dto.BoutStatDto;
import com.liao.badminton.dto.StatDto;
import com.liao.badminton.vo.BoutStatVo;
import com.liao.badminton.vo.StatVo;
import org.apache.ibatis.annotations.Mapper;
import com.liao.badminton.entity.BoutStat;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
* @author liaocheng
* @date 2024-10-31
* description:录入对局统计表
*/
@Mapper
public interface BoutStatMapper extends BaseMapper<BoutStat> {
    int updateBy(BoutStat boutStat);
    int add(BoutStat boutStat);
    List<BoutStatVo> findByPageParam(PageParam<BoutStatDto> boutStatPageParam);
    int countByPageParam(PageParam<BoutStat> boutStatPageParam);
    int deletes(@Param("ids") List<Long> ids);
    int deleteByImportId(@Param("importRecordId") Long ids);
    List<BoutStat> findByIds(@Param("ids") List<Long> ids);
    void addBatch(List<BoutStat> list);
    BoutStat findById(@Param("id") Long id);
    List<BoutStat> findByParam(@Param("param") BoutStat param);
    StatVo findPersonalStat(StatDto param);

    List<StatVo> findRankListByGroupId(@Param("groupId")Long groupId,@Param("findTimeType")Integer findTimeType,
                                       @Param("orderByType")Integer orderByType,@Param("orderByTypeDesc")Integer orderByTypeDesc,
                                       @Param("teamOneName")String teamOneName

    );
}
